With the growing enthusiasm towards physical exercises and healthy lifestyles, more and more attention has been given to electronic devices, such as terminals and wearable devices, that can provide statistical information about physical exercise. A user may carry such an electronic device during physical exercise to record the user's actions. For example, when the user is walking or running, the electrical device may count the steps of the user, the walking/running distance, and the calorie consumption of the user, etc.